package org.ihelpuoo.weboo.tag.ajax;

import javax.servlet.jsp.JspException;

import org.ihelpuoo.lang.StringUtils;

public class GetterTag extends SettingTag
{

	private static final long	serialVersionUID	= -4151803356823480559L;

	private String				name;
	private String				params;

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getParams()
	{
		return params;
	}

	public void setParams(String paramName)
	{
		this.params = paramName;
	}

	public String getBody()
	{
		return this.getBodyString();
	}

	@Override
	protected void end() throws JspException
	{
		((ViewTag)this.getParent()).addGetter(this);
	}

	@Override
	protected boolean isAvailable()
	{
		return !StringUtils.isBlank(name) && !this.isBlankBody();
	}

}
